<html>
<head>
    <title>风险责任清单</title>
    <link rel="stylesheet" href="../../../assets/theme-chalk/index.css">
    <link rel="stylesheet" href="../../../style.css">

    <style>
        body {
            background: #F0F2F6;
        }

        .main-head {
            background: #fff;
            padding-left: 10px;
            padding-top: 10px;
            margin-bottom: 0px;
            border: solid 1px #fff;
        }

        .chart-outer {
            height: 200px;
        }

        img {
            width: 30px;
            width: 32px;
        }

        td {
            text-align: center;
            height: 50px; /*这里需要自己调整，根据自己的需求调整高度*/
            position: relative;
        }

        td[class=first] {
            width: 100px;
        }

        td[class=first]:before {
            content: "";
            position: absolute;
            width: 1px;
            height: 160px;
            top: 0;
            left: 0;
            background-color: #000;
            display: block;
            transform: rotate(-73deg);
            transform-origin: top;
            -ms-transform: rotate(-73deg);
            -ms-transform-origin: top;
        }

        .title1 {
            position: absolute;
            top: 0px;
            right: 0px;
        }

        .title2 {
            position: absolute;
            top: 26px;
            right: 70px;
        }

        .el-dialog {
            position: absolute;
            top: 50%;
            left: 50%;
            margin: 0 !important;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            max-height: calc(100% - 30px);
            width: 100%;
            /*max-width: calc(100% - 30px);*/
        }
    </style>
</head>
<body>
<div class="page" id="page-monitor">
    <div class="page-title">公文推送</div>
    <div class="page-main">
        <el-table :data="tableData" :stripe="true" :border="true" size="mini" style="width: 100%">
            <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>

            <el-table-column prop="DocName" label="公文名称" align="center"></el-table-column>
            <el-table-column prop="DocNo" label="公文号" align="center"></el-table-column>
            <el-table-column prop="DocTime" label="公文日期" align="center">
                <template slot-scope="scope" v-if="scope.row.DocTime">
                    <el-tag size="medium">{{scope.row.DocTime.replace("T"," ").substr(0,10)}}</el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="file" label="下载文件" align="center">
                <template slot-scope="scope">
                    <el-button @click="report(scope.row.file)" size="small" type="primary">下载</el-button>
                </template>
            </el-table-column>
        </el-table>
        <div class="page-footer">
            <el-pagination background layout="prev, pager, next" :pagesize="param.pagesize" :total="param.totalCount"
                           :current-page.sync="param.pageno" @current-change="onChangePage">
            </el-pagination>
        </div>
    </div>
</div>

<script type='text/javascript' src='../../../assets/bundle.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/bundle.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/jquery-1.11.2.min.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../assets/echarts.min.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../js/common.js' charset='utf-8'></script>
<script type='text/javascript' src='../../../js/component.js' charset='utf-8'></script>

<script>

    var vuePage = new Vue({
        el: '#page-monitor',
        data: {
            tableData: [],
            param:{
                pagesize:10,
                totalCount:10,
                pageno:1,
            }
        },
        methods: {
            onChangePage(page){
                 this.param.pageno = page;
                 this.getDoc();
            },
            getDoc(){
                HttpUtil.get('GovernmentDoc/companyDocList',this.param).success((r)=>{
                         this.tableData = r.data;
                         this.param.totalCount = r.total;
                })
            },
            report(file){
                window.location = SiteConfig.webApiset + file;
            }
        },
        created: function () {
             this.param.projectNo = SiteConfig.account.projectNo;
        },
        mounted: function () {
            this.getDoc();
        }
    });


</script>

</body>
</html>
